package pri.damai.xiaowu.goods.server.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import pri.damai.xiaowu.common.core.model.BaseEntity;

import java.util.List;


/**
 * sku表(ProductSku)表实体类
 * @Desc
 * @Author DaMai
 * @Date 2022-03-22 15:22:17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(autoResultMap = true)
public class ProductSku extends BaseEntity {


    /** SPU ID */
    private Integer spuId;

    /** 销售属性值{attr_value_id}-{attr_value_id} 多个销售属性值逗号分隔 */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> attrs;

    /** banner图片 多个图片逗号分隔 */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> bannerUrl;

    /** 商品介绍主图 多个图片逗号分隔 */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> mainUrl;

    /** 售价，整数方式保存 */
    private Long priceFee;

    /** 市场价，整数方式保存 */
    private Long marketPriceFee;

    private Integer stockNum;

    /** 状态 1:enable, 0:disable, -1:deleted */
    private Integer status;

}
